package com.unipay.springcloud20.service.impl;

import com.unipay.springcloud20.dao.PaymentDao;
import com.unipay.springcloud20.entities.Payment;
import com.unipay.springcloud20.service.PaymentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Project: springcloud20
 * @Author: C.yu
 * @Time: 2023-03-14 21:35:26
 * @Desc: TODO
 */
@Transactional
@Service
public class PaymentServiceImpl implements PaymentService {

    @Resource
    private PaymentDao paymentDao;

    //@Override
    //public int add(Payment payment) {
    //    return paymentDao.add(payment);
    //}
    @Override
    public int create(Payment payment)
    {
        return paymentDao.create(payment);
    }

    @Override
    public Payment getPayByID(Long id) {
        return paymentDao.getPayByID(id);
    }
}
